package com.cqcomponents.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ComponentInjection {
	/**
	 * The name of the children resources. All resources starting with this name
	 * are injected
	 * 
	 * @return
	 */
	String childName() default "";

	/**
	 * The name of the attribute where the path to the children is saved. All
	 * child resources below that path are injected. If @see
	 * {@link ComponentInjection#childName()} is specified then only child
	 * resources starting with that child name are injected
	 * 
	 * @return
	 */
	String rootPathAttribute() default "";

	/**
	 * The depth to load children. Defaults to 1 which means children. 2 means
	 * children and grand-children
	 * 
	 * @return
	 */
	byte depthAttribute() default 1;

	boolean mandatory() default false;

	String primaryType() default "";
}
